<%= simple_form_for [:backend, @admin_user], wrapper: :admin_theme, html: {'data-parsley-validate': true, class: 'uk-form uk-form-horizontal', autocomplete: 'off'} do |f| %>
  <%= f.input :name, label: '姓名', autofocus: true, required: true, placeholder: '' %>
  <%= f.input :login, label: '登录名', input_heml:{ required: true, placeholder: '' }%>
  <%= f.input :email, label: '邮箱', required: true, placeholder: '' %>
  <%= f.input :password, label: '密码', required: @admin_user.new_record? ? true : false, placeholder: @admin_user.new_record? ? '最少6位字符' : '如果不修改密码，请留空' %>
  <%= f.input :password_confirmation, label: '确认密码', required: @admin_user.new_record? ? true : false, placeholder: @admin_user.new_record? ? '最少6位字符' : '确认密码' %>
  <%= f.input :status, as: :radio_buttons, label: '状态', collection: AdminUser.options_for_select(:statuses), required: true, placeholder: '' %>
  <h4>角色</h4>
  <%= f.association :roles, as: :check_boxes %>

  <hr>
  <button class="uk-button uk-button-success">提交</button>
<% end %>
